﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net.Sockets;

namespace StationUpdate.Enty
{
    public class TermStation
    {
        private double fileSize;
        private double curUpdateSize;
        private string termId;
        private DateTime lastUpdateTime;
        private string hardWareVer;
        private string softVer;
        private bool isUpdated;
        private int fairCount;
        /// <summary>
        /// 是否已升级过,不管升级成功或失败,只要进行了升级,该标记就变成true,
        /// 如果该值为true:终端再发送过来状态包,不再发送升级第一包的命令.
        /// 如果该值为false:终端向服务端发送状态包,说明终端连接成功,则向终端发送第一包,同时将该值置为true.
        /// </summary>
        public bool IsUpdated
        {
            get { return isUpdated; }
            set { isUpdated = value; }
        }

        /// <summary>
        /// 终端--软件版本
        /// </summary>
        public string SoftVer
        {
            get { return softVer; }
            set { softVer = value; }
        }
        /// <summary>
        /// 终端--硬件版本
        /// </summary>
        public string HardWareVer
        {
            get { return hardWareVer; }
            set { hardWareVer = value; }
        }
        /// <summary>
        /// 升级文件总大小
        /// </summary>
        public double FileSize
        {
            get { return fileSize; }
            set { fileSize = value; }
        }
        /// <summary>
        /// 当前已成功升级了的包序号
        /// </summary>
        public double CurUpdateSize
        {
            get { return curUpdateSize; }
            set { curUpdateSize = value; }
        }
        /// <summary>
        /// 集中控制器id
        /// </summary>
        public string TermId
        {
            get { return termId; }
            set { termId = value; }
        }
        /// <summary>
        /// 最近一次终端应答时间
        /// </summary>
        public DateTime LastUpdateTime
        {
            get { return lastUpdateTime; }
            set { lastUpdateTime = value; }
        }

        public int FairCount
        {
            get { return fairCount; }
            set { fairCount = value; }
        }

    }
}
